<script setup>
const props = defineProps({
  sonMoney: {
    type: Number,
    default: 0,
    required: true
  }
})
const emits = defineEmits(['setMoney'])
// emits====this.$emit
function btnClick () {
  //   props.sonMoney = 2000
  //   console.log(props.sonMoney)
  emits('setMoney', 2000)
}
</script>
<template>
  <div>我是子组件</div>
  <div>父给子的money:{{ sonMoney }}</div>
  <button @click="btnClick">我想多要点钱</button>
</template>
<style></style>
